package com.v3admin.system.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.v3admin.common.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;

/**
 * 用户与角色关联关系
 *
 * @author Junpeng.Li
 * @date 2023-12-14 15:52
 */
@Getter
@Setter
@TableName("system_user_role")
public class SystemUserRole extends BaseEntity {

    /**
     * 数据库字段
     */
    public static final String TBF_USER_ID = "user_id";
    public static final String TBF_ROLE_ID = "role_id";

    /**
     * 实际表中没有这个ID, 防止mybatis-plus在启动时报警告
     */
    @TableId
    @Deprecated
    private Long id;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 角色ID
     */
    private Long roleId;

    public SystemUserRole(Long userId, Long roleId) {
        this.userId = userId;
        this.roleId = roleId;
    }
}
